<?php

namespace IDock\Insurance\TAIC\Request;

use IDock\Insurance\TAIC\Response\PolicyPayment2Response;
use IDock\Visitor\PolicyPaymentVisitor;

class PolicyPayment2Request extends AllTAICRequest
{
    protected $route = 'access/car/newApplyPay.mvc';

    protected $response = PolicyPayment2Response::class;

    protected $urlTip = '支付新';

    /*** @var  PolicyPaymentVisitor $visitor */
    protected $visitor;

    public function setPageUrl($pageUrl)
    {
        $this->pageUrl = $pageUrl;
    }

    public function generate(): array
    {
        $this->tradeNo = $this->visitor->argc['tradeNo'] ?? '';

        return [
            'orderNo' => $this->tradeNo,
            'payType' => '7',
            'pageUrl' => $this->pageUrl,
        ];
    }
}